Johnnyprofane Posted November 16, 2013 Share Posted November 16, 2013 So, I've been working on a mod character for a while, I'm pretty much done, but I would love Maxwell to say something different than the usual "say pal..." upon start. I've been looking at some lua files, namely maxwellintro (under nis),components.talker , and strings. I feel like my solution should be in these three, plus dropping a postinit in modmain. Any help would be greatly appreciated. Also if I'm completely wrong, that's ok. Is it possible to do this? Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/ Share on other sites More sharing options...
Ortorin Posted November 16, 2013 Share Posted November 16, 2013 I am utterly confused for the second time tonight on this forum... what does this have to do with world gen? Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371199 Share on other sites More sharing options...
Johnnyprofane Posted November 16, 2013 Author Share Posted November 16, 2013 Well, maybe nothing actually. But I know editing wether maxwell spawns or not is part of world gen, my initial thought was editing the sequence of events that are triggered upon entering the world might also be considered world gen. Looking at it now it probably isn't. Good point sir Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371203 Share on other sites More sharing options...
Ortorin Posted November 16, 2013 Share Posted November 16, 2013 Well, maybe nothing actually. But I know editing wether maxwell spawns or not is part of world gen, my initial thought was editing the sequence of events that are triggered upon entering the world might also be considered world gen. Looking at it now it probably isn't. Good point sir You, sir, are a true intellectual and I respect that. Someone throw this guy a code-bone and help him out please. Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371211 Share on other sites More sharing options...
Rosten Posted November 16, 2013 Share Posted November 16, 2013 I'm not exactly a coder, but something similar happens in adventure mode, doesn't what maxwell says change every new world you enter? you might be able to look into that just a theory, a CODE THEORY, thank you for watching Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371219 Share on other sites More sharing options...
Johnnyprofane Posted November 16, 2013 Author Share Posted November 16, 2013 You, sir, are a true intellectual and I respect that. Someone throw this guy a code-bone and help him out please.Thank you very much, I do my best anyways. So I would like terribly to change the title of this thread, but for the life of me can't figure out how. It may just be I'm incredibly dense, but I've never had to change a title of a thread before. So any help on changing the Maxwell intro, along with details on how to fix this blasted thread would be greatly appreciated. Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371261 Share on other sites More sharing options...
Developer Cheerio Posted November 16, 2013 Developer Share Posted November 16, 2013 Try adding this line to modmain.lua. GLOBAL.STRINGS.MAXWELL_SANDBOXINTROS.ONE = "Hello friend!" Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371267 Share on other sites More sharing options...
Malacath Posted November 16, 2013 Share Posted November 16, 2013 Try adding this line to modmain.lua. GLOBAL.STRINGS.MAXWELL_SANDBOXINTROS.ONE = "Hello friend!"From my experience this will only work in the root of modmain where we can't use it to check for what character is played. Instead I would suggest hooking into "maxwellintro" and changing the appropriate entries ininst.components.maxwelltalker.speechOr something along those lines. You can always look for reference in "maxwellintro.lua" for which entries are relevant for you. Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371301 Share on other sites More sharing options...
KiddyCorky Posted November 16, 2013 Share Posted November 16, 2013 (edited) Here's something Malacath gave me.local function ModMaxwellIntro(inst) if GLOBAL.GetPlayer().prefab == "CHARACTERPREFABNAME" then inst.components.maxwelltalker.speeches.SANDBOX_1 = { appearsound = "dontstarve/maxwell/disappear", voice = "dontstarve/maxwell/talk_LP", appearanim = "appear", idleanim= "idle", dialogpreanim = "dialog_pre", dialoganim="dial_loop", dialogpostanim = "dialog_pst", disappearanim = "disappear", disableplayer = true, skippable = true, { string = "Say pal, you don't look so good.", wait = 3, anim = nil, sound = nil, }, { string = "You better find something to eat before night comes.", wait = 3, anim = nil, sound = nil, }, } endend AddPrefabPostInit("maxwellintro", ModMaxwellIntro)Place this inside your modmain.lua file. After ofcourse entering the name of the prefab your character uses and replacing the default lines with something you want. I don't know though how to make a character use Waxwell's intro. It's probably something about denying the use of the entire intro file and just making the character wake up without Maxwell greeting you. Edited November 16, 2013 by KiddyCorky Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371328 Share on other sites More sharing options...
Johnnyprofane Posted November 16, 2013 Author Share Posted November 16, 2013 You guys are the best ("sniff", tears up) Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371604 Share on other sites More sharing options...
KiddyCorky Posted November 16, 2013 Share Posted November 16, 2013 (edited) You guys are the best ("sniff", tears up) Yeah no problem. I'am more curious to know how to make characters use Waxwell's intro. Since it's definetaly not inside waxwell.lua or maxwellintro.lua. Edited November 16, 2013 by KiddyCorky Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-371693 Share on other sites More sharing options...
NikMik Posted November 21, 2013 Share Posted November 21, 2013 This has worked great so far. I can get him to change his speech for the intro, but not for the adventure. By that I mean, what he says in the intro. And then he says something else during adventure. Example: Intro: "Say Pal, hooby dooby!Go skip rope for me!" Adventure: "You didn't skip rope well enough.Now hooba-doo and get outta here." That's not actually what he'll say, but you know what I mean? Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-374907 Share on other sites More sharing options...
Malacath Posted November 21, 2013 Share Posted November 21, 2013 (edited) Changing the speech for adenture works basically the same. Take a look into "maxwellintro.lua", copy the local table "Speech" from there into your modmain and edit whatever you need to edit. Then do the same check you did so far and instead of changing a single subtable of the "maxwelltalker" component change the whol thing like solocal Speech = { LOOOOOOOOOOOOOOTS of stuff}local function ModMaxwellIntro(inst) if GLOBAL.GetPlayer().prefab == "CHARACTERPREFABNAME" then inst.components.maxwelltalker.speeches = Speech endend AddPrefabPostInit("maxwellintro", ModMaxwellIntro) Edited November 21, 2013 by Malacath Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-374931 Share on other sites More sharing options...
NikMik Posted November 21, 2013 Share Posted November 21, 2013 I tried that. It would replace the last one, so the adventure would work but the survival intro wouldn't. I got it. Just put in a comma that wasn't meant to be there. local function ModMaxwellIntro(inst) if GLOBAL.GetPlayer().prefab == "wil" then inst.components.maxwelltalker.speeches.SANDBOX_1 = {stuff stuff {string stuff }, } (< here is where I put the comma that shouldn't have been there) inst.components.maxwelltalker.speeches.ADVENTURE_1 = (<for the adventure) { stuff stuff{string stuff }, } endend Link to comment https://forums.kleientertainment.com/forums/topic/29724-how-can-i-change-the-maxwell-intro/#findComment-374934 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now